@echo off
echo USASGE : runJob.bat {jobName}
set JAVA_CMD=%JAVA_HOME%\bin\java
set MAIN_CLASS=org.springframework.batch.core.launch.support.CommandLineJobRunner
set CLASSPATH=.

FOR %%F IN (*.jar) DO call :addcp %%F
 
FOR %%F IN (lib\*.jar) DO call :addcp %%F
 goto extlibe
 
:addcp
set CLASSPATH=%CLASSPATH%;%1
goto :eof
 
:extlibe
 
"%JAVA_CMD%" -Xmx512M -cp "%CLASSPATH%" %MAIN_CLASS% applicationContext.xml %*